package com.excilys.training.ebanking.web.controllers;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class DefaultController {

	
	@RequestMapping("index.html")
	public String redirectIndex(ModelMap model){
		return "login";
	}
	
	@RequestMapping("/admin/accueil.html")
	public String redirectClient(ModelMap model){
		return "/admin/accueil";
	}
	
	
	@RequestMapping("/loginFailure.html")
	public String redirectFailLogin(ModelMap model){
		String messageErreure= "Login ou mot de passe invalide";
		model.addAttribute("Erreure", messageErreure);
		return "login";
	}
}
